class ZoneResetModesController < ApplicationController
  # GET /zone_reset_modes
  # GET /zone_reset_modes.xml
  def index
    @zone_reset_modes = ZoneResetMode.all

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @zone_reset_modes }
    end
  end

  # GET /zone_reset_modes/1
  # GET /zone_reset_modes/1.xml
  def show
    @zone_reset_mode = ZoneResetMode.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @zone_reset_mode }
    end
  end

  # GET /zone_reset_modes/new
  # GET /zone_reset_modes/new.xml
  def new
    @zone_reset_mode = ZoneResetMode.new

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @zone_reset_mode }
    end
  end

  # GET /zone_reset_modes/1/edit
  def edit
    @zone_reset_mode = ZoneResetMode.find(params[:id])
  end

  # POST /zone_reset_modes
  # POST /zone_reset_modes.xml
  def create
    @zone_reset_mode = ZoneResetMode.new(params[:zone_reset_mode])

    respond_to do |format|
      if @zone_reset_mode.save
        format.html { redirect_to(@zone_reset_mode, :notice => 'Zone reset mode was successfully created.') }
        format.xml  { render :xml => @zone_reset_mode, :status => :created, :location => @zone_reset_mode }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @zone_reset_mode.errors, :status => :unprocessable_entity }
      end
    end
  end

  # PUT /zone_reset_modes/1
  # PUT /zone_reset_modes/1.xml
  def update
    @zone_reset_mode = ZoneResetMode.find(params[:id])

    respond_to do |format|
      if @zone_reset_mode.update_attributes(params[:zone_reset_mode])
        format.html { redirect_to(@zone_reset_mode, :notice => 'Zone reset mode was successfully updated.') }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @zone_reset_mode.errors, :status => :unprocessable_entity }
      end
    end
  end

  # DELETE /zone_reset_modes/1
  # DELETE /zone_reset_modes/1.xml
  def destroy
    @zone_reset_mode = ZoneResetMode.find(params[:id])
    @zone_reset_mode.destroy

    respond_to do |format|
      format.html { redirect_to(zone_reset_modes_url) }
      format.xml  { head :ok }
    end
  end
end
